package store.pay.icbc;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import store.pay.PayResultObject;
import store.pay.PayResultService;
import store.util.HttpUtils;

public class IcbcB2bServerPayResultService implements PayResultService {

	public boolean doFail(HttpServletRequest request,
			HttpServletResponse response, PayResultObject pro) {
		System.out.println("doFail-------------->" + new Date());
		return false;
	}

	public boolean doSuccess(HttpServletRequest request,
			HttpServletResponse response, PayResultObject pro) {
		System.out.println("doSuccess-------------->" + new Date());
		return false;
	}

	public boolean doVerifyFail(HttpServletRequest request,
			HttpServletResponse response, PayResultObject pro) {
		System.out.println("doVerifyFail-------------->" + new Date());
		return false;
	}

	public PayResultObject payResultObject(HttpServletRequest request) {
		IcbcB2bPayResultObject o = new IcbcB2bPayResultObject();
		try {
			HttpUtils.bindBeanOnlyString(request, o, "GBK");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return o;
	}

}
